import request from '@/utils/request'

export function findByPage(query) {
  return request({
    url: '/carousel/findByPage',
    method: 'get',
    params: query //表单数据
  })
}

export function fetchCarouselList() {
  return request({
    url: '/carousel/list',
    method: 'get'
  })
}

export function addCarousel(data) {
  return request({
    url: '/carousel/add',
    method: 'post',
    data
  })
}

export function updateCarousel(data) {
  return request({
    url: '/carousel/updateById',
    method: 'post',
    data
  })
}

export function deleteCarousel(carouselId) {
  return request({
    url: '/carousel/deleteById',
    method: 'get',
    params: {"carouselId":carouselId}
  })
}
